<template>
    <div>
        <div class="table_title">月度库存统计</div>
        <table>
            <tbody>
                <tr>
                    <td rowspan="2">药品名称</td>
                    <td rowspan="2">规格</td>
                    <td rowspan="2">单位</td>
                    <td colspan="3">上月数量</td>
                    <td colspan="3">本月入库</td>
                    <td colspan="3">本月出库</td>
                    <td colspan="3">本月结余</td>
                </tr>
                <tr>
                    <td>数量</td>
                    <td>单价</td>
                    <td>金额</td>
                    <td>数量</td>
                    <td>单价</td>
                    <td>金额</td>
                    <td>数量</td>
                    <td>单价</td>
                    <td>金额</td>
                    <td>数量</td>
                    <td>单价</td>
                    <td>金额</td>
                </tr>
                <tr v-for="(item,index) in data" :key="index">
                    <td>{{item.ProName}}</td>
                    <td>{{item.Spec}}</td>
                    <td>{{item.Unit}}</td>
                    <td>{{item.MMonthStockCount}}</td>
                    <td>{{item.MMonthStockCost}}</td>
                    <td>{{item.MMonthStockAllCost}}</td>
                    <td>{{item.IMonthStockCount}}</td>
                    <td>{{item.IMonthStockCost}}</td>
                    <td>{{item.IMonthStockAllCost}}</td>
                    <td>{{item.OMonthStockCount}}</td>
                    <td>{{item.OMonthStockCost}}</td>
                    <td>{{item.OMonthStockAllCost}}</td>
                    <td>{{item.NMonthStockCount}}</td>
                    <td>{{item.NMonthStockCost}}</td>
                    <td>{{item.NMonthStockAllCost}}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script>
export default {
    props: ['data'],
}
</script>

<style lang="less" scoped>
.table_title {
    text-align: center;
    font-size: 18px;
}

table {
    border-collapse: collapse;
    border: solid 1px Black;
}
table td {
    // width: 112px;
    height: 20px;
    border: solid 1px Black;
    padding: 4px 2px;
    text-align: center;
}
</style>